\(\int \frac {a+b \arctan (c x)}{x^2} \, dx\) [8]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 35 \[ \int \frac {a+b \arctan (c x)}{x^2} \, dx=-\frac {a+b \arctan (c x)}{x}+b c \log (x)-\frac {1}{2} b c \log \left (1+c^2 x^2\right ) \]

[Out]

(-a-b*arctan(c*x))/x+b*c*ln(x)-1/2*b*c*ln(c^2*x^2+1)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {4946, 272, 36, 29, 31} \[ \int \frac {a+b \arctan (c x)}{x^2} \, dx=-\frac {a+b \arctan (c x)}{x}-\frac {1}{2} b c \log \left (c^2 x^2+1\right )+b c \log (x) \]

[In]

Int[(a + b*ArcTan[c*x])/x^2,x]

[Out]

-((a + b*ArcTan[c*x])/x) + b*c*Log[x] - (b*c*Log[1 + c^2*x^2])/2

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {a+b \arctan (c x)}{x}+(b c) \int \frac {1}{x \left (1+c^2 x^2\right )} \, dx \\ & = -\frac {a+b \arctan (c x)}{x}+\frac {1}{2} (b c) \text {Subst}\left (\int \frac {1}{x \left (1+c^2 x\right )} \, dx,x,x^2\right ) \\ & = -\frac {a+b \arctan (c x)}{x}+\frac {1}{2} (b c) \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )-\frac {1}{2} \left (b c^3\right ) \text {Subst}\left (\int \frac {1}{1+c^2 x} \, dx,x,x^2\right ) \\ & = -\frac {a+b \arctan (c x)}{x}+b c \log (x)-\frac {1}{2} b c \log \left (1+c^2 x^2\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.09 \[ \int \frac {a+b \arctan (c x)}{x^2} \, dx=-\frac {a}{x}-\frac {b \arctan (c x)}{x}+b c \log (x)-\frac {1}{2} b c \log \left (1+c^2 x^2\right ) \]

[In]

Integrate[(a + b*ArcTan[c*x])/x^2,x]

[Out]

-(a/x) - (b*ArcTan[c*x])/x + b*c*Log[x] - (b*c*Log[1 + c^2*x^2])/2

Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.11

method result size
parallelrisch \(\frac {2 b c \ln \left (x \right ) x -b c \ln \left (c^{2} x^{2}+1\right ) x -2 b \arctan \left (c x \right )-2 a}{2 x}\) \(39\)
parts \(-\frac {a}{x}+b c \left (-\frac {\arctan \left (c x \right )}{c x}-\frac {\ln \left (c^{2} x^{2}+1\right )}{2}+\ln \left (c x \right )\right )\) \(40\)
derivativedivides \(c \left (-\frac {a}{c x}+b \left (-\frac {\arctan \left (c x \right )}{c x}-\frac {\ln \left (c^{2} x^{2}+1\right )}{2}+\ln \left (c x \right )\right )\right )\) \(44\)
default \(c \left (-\frac {a}{c x}+b \left (-\frac {\arctan \left (c x \right )}{c x}-\frac {\ln \left (c^{2} x^{2}+1\right )}{2}+\ln \left (c x \right )\right )\right )\) \(44\)
risch \(\frac {i b \ln \left (i c x +1\right )}{2 x}-\frac {-2 b c \ln \left (x \right ) x +b c \ln \left (-c^{2} x^{2}-1\right ) x +i b \ln \left (-i c x +1\right )+2 a}{2 x}\) \(60\)

[In]

int((a+b*arctan(c*x))/x^2,x,method=_RETURNVERBOSE)

[Out]

1/2*(2*b*c*ln(x)*x-b*c*ln(c^2*x^2+1)*x-2*b*arctan(c*x)-2*a)/x

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.06 \[ \int \frac {a+b \arctan (c x)}{x^2} \, dx=-\frac {b c x \log \left (c^{2} x^{2} + 1\right ) - 2 \, b c x \log \left (x\right ) + 2 \, b \arctan \left (c x\right ) + 2 \, a}{2 \, x} \]

[In]

integrate((a+b*arctan(c*x))/x^2,x, algorithm="fricas")

[Out]

-1/2*(b*c*x*log(c^2*x^2 + 1) - 2*b*c*x*log(x) + 2*b*arctan(c*x) + 2*a)/x

Sympy [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.06 \[ \int \frac {a+b \arctan (c x)}{x^2} \, dx=\begin {cases} - \frac {a}{x} + b c \log {\left (x \right )} - \frac {b c \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2} - \frac {b \operatorname {atan}{\left (c x \right )}}{x} & \text {for}\: c \neq 0 \\- \frac {a}{x} & \text {otherwise} \end {cases} \]

[In]

integrate((a+b*atan(c*x))/x**2,x)

[Out]

Piecewise((-a/x + b*c*log(x) - b*c*log(x**2 + c**(-2))/2 - b*atan(c*x)/x, Ne(c, 0)), (-a/x, True))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.11 \[ \int \frac {a+b \arctan (c x)}{x^2} \, dx=-\frac {1}{2} \, {\left (c {\left (\log \left (c^{2} x^{2} + 1\right ) - \log \left (x^{2}\right )\right )} + \frac {2 \, \arctan \left (c x\right )}{x}\right )} b - \frac {a}{x} \]

[In]

integrate((a+b*arctan(c*x))/x^2,x, algorithm="maxima")

[Out]

-1/2*(c*(log(c^2*x^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*b - a/x

Giac [F]

\[ \int \frac {a+b \arctan (c x)}{x^2} \, dx=\int { \frac {b \arctan \left (c x\right ) + a}{x^{2}} \,d x } \]

[In]

integrate((a+b*arctan(c*x))/x^2,x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.03 \[ \int \frac {a+b \arctan (c x)}{x^2} \, dx=b\,c\,\ln \left (x\right )-\frac {a}{x}-\frac {b\,\mathrm {atan}\left (c\,x\right )}{x}-\frac {b\,c\,\ln \left (c^2\,x^2+1\right )}{2} \]

[In]

int((a + b*atan(c*x))/x^2,x)

[Out]

b*c*log(x) - a/x - (b*atan(c*x))/x - (b*c*log(c^2*x^2 + 1))/2